Results 1 to 8 of 8

Thread: Can someone help with an idea how to trigger someone dead if he touches ground?

  1. #1

    Default Can someone help with an idea how to trigger someone dead if he touches ground?

    im making a mod with a course to run

    lets say some boxes in the air and u have to jump from the one to the other... but when u miss and fall down u should be dead and respawn at the start again.

    whats the most easy way to do that?

    greets slim

    edit: a video of what im trying to do http://social.xfire.com/video/6351a4
    Last edited by Slimbips {sfx}; May 18th, 2015 at 03:17 PM.

  2. #2

    Default

    1) LOL all I'm imagining is everyone on my TS being drunk or stoned out of their mind trying to play this on a Friday night.
    2) Looks pretty doable - probably the easiest way would be to make a trigger run the entire X, Y coord of the tank alley, and with the Z coord set just above the ground, or just under your lowest box. As soon as you touch the trigger you die. OR you could make each of the boxes a trigger, and every 5 seconds or so the trigger checks to see if the player is touching the trigger, if they are it won't do anything - if they aren't, it kills them.

    Here's how the first one would look:
    GroundTrigger:
    
    	local.trig targetname gtrig
    	local.trig = spawn trigger_multiple
    	local.trig.origin = ( -2940 2740 270 ) // You'll have to change this to the coords and size for your trigger for destroyed village
    	local.trig setsize ( -650 -650 -20 ) ( 650 650 1 )
    	local.trig setthread GroundTriggerActor
    	local.trig wait 0
    	local.trig delay 0
    end
    
    GroundTriggerActor:
    	self waittill prespawn
    	local.player=parm.other
    		if (local.player.isGroundTriggerActor==1)
    		end
    
    	local.player.isGroundTriggerActor=1
    	wait .1
    	local.player kill
            local.player hurt 200
    	wait .1
    	local.player.isGroundTriggerActor=0
    end

  3. #3

    Default

    cool thanks, will try it soon

  4. #4

    Default

    thanks blatter works great

    is there an maximum to the setsize?
    Last edited by Slimbips {sfx}; May 19th, 2015 at 07:54 AM.

  5. #5

    Default

    I don't think so, I know I've made a spawn object the length of a map before (adding clear walls on single player maps to cut down map size) and it hasn't ever given me an issue.

  6. #6
    Developer Sor's Avatar
    Join Date
    Aug 2010
    Location
    The Medieval City of Bruges
    Posts
    747

    Default

    Quote Originally Posted by Slimbips View Post
    thanks blatter works great

    is there an maximum to the setsize?
    It's 8192, if I remember correctly, since radiant does not allow you to create maps larger than 8192x8192
    Morpheus Script (MoH) => You try to shoot yourself in the foot only to discover that MorpheusScript already shot your foot for you.

  7. #7

    Default

    oke cool thanks... i have 9512.. so it just goes aout beyond , works good... only need to make multiple triggers for some stuff that are higher than the ground

  8. #8
    Developer Sor's Avatar
    Join Date
    Aug 2010
    Location
    The Medieval City of Bruges
    Posts
    747

    Default

    Yeah, MoHAA doesn't really care either way. I remember I wanted to automatically detect the boundaries of maps once. I used trace in each direction. If I bumped into something, I move one unit forward in that direction and try again. Once you start a trace outside of the map's boundaries, however, the trace would go as far as you want. So if a trace moves 32768 units at once, then the endpoint of the last trace stopped at a boundary.
    Morpheus Script (MoH) => You try to shoot yourself in the foot only to discover that MorpheusScript already shot your foot for you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •